<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
<%@ include file="/commons/taglibs.jsp"%>
<%@ taglib uri="/tag" prefix="tag"%>
<tag:customerLogonCheck />

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>用户个人中心-支付</title>
<link href="../style/common.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="../js/common.js"></script>
<script type="text/javascript" src="../js/jquery-1.3.2.js"></script>

<style type="text/css">
#main{margin: 0 auto;width: 960px;background-color: #ffffff;min-height: 450px;border: 1px solid #ccc;margin-top: 5px;}
.A12 {font-size: 12px;line-height: 5px;color: #000000;padding: 10px 12px 10px 17px;}
.A14 {font-size: 14px;line-height: 10px;color: #000000;padding:10px 12px 10px 17px;}
#dglc{margin: 0 auto;width: 830px;margin-top: 35px;}
.nw12c {font-size: 12px;line-height: 25px;color: #000000;padding: 5px 5px 5px 7px;}
.STYLE3 {font-family: "黑体"; color:#fd9b35;font-weight: bold;font-size: 26px;padding: 0px 12px 22px 20px; }
.STYLE4 {font-size: 14px;padding: 12px 12px 12px 20px;}
</style>
</head>

<script type="text/javascript">
function toPay(){
	var isnull = 0;
	 $('input[name="paymentid"]:checked').each(function(){
	  	 isnull++;
	  });
	  if(isnull == 0)
	  {
		   alert('请选择支付方式!');
		   return false;
	  }

	  createPopupDiv("_link_div_win",400,160,true);
	
	  var paymentid =  $('input[name="paymentid"]:checked').val();
	  if( paymentid == "2"){
		  $("#payForm").attr("action","${ctx}/user/alipay.jsp");
		  $("#payForm").submit();
		  return;
	  }else{
		  $("#payForm").attr("action","${ctx }/customer/paywidget.do");
		  $("#payForm").submit();
	  }
}
/**支付完成 **/
function finishzf(){

	location.href = "${ctx }/customer/order!listAll.do";
}
/**支付出现问题**/
function no_finishzf(){

	location.href = "${ctx }/customer/order!listAll.do";
}
</script>
<body>

	<%@include file="/commons/head.jsp"%>

<div id="main">
	
	<div id="dglc">
		<div style="float: right;"><img src="${ctx }/images/order/order_step3.png" border="0"/></div>
		<div style="float: right;padding-top: 5px;">订购流程:</div>
		<div style="clear: both;"></div>
	</div>
	
	<div style="margin-top: 30px;">
	   <form action="${ctx }/customer/paywidget.do" method="post" id="payForm" style="margin: 0px;padding: 0px;" target="_blank">
		    <table width="896" border="0" cellspacing="0" cellpadding="0" align="center">
		      <tr>
		        <td colspan="2" class="STYLE3">选择付款方式</td>
		      </tr>
		      <tr>
		        <td valign="top" class="STYLE4" width="25%">
		        	<div>
		               <input type="radio" name="paymentid" value="1" /><img src="../images/zf/cft.gif" width="130" height="52" align="absmiddle" />
		          	</div>
		        </td>
		        <td width="25%">
		         	<div style="padding: 10px 0px 0px 0px;">
		          		<input type="radio" name="paymentid" value="2" /><img src="../images/zf/zfb.gif" width="130" height="52" align="absmiddle" />
		          	</div>
		        </td>
		        <td width="25%"></td>
		        <td width="25%"></td>
		      </tr>
		    </table>
	    
		    <div style="text-align: center; margin-top: 70px">
		    	<input type="hidden" value="${requestScope.orderid }" name="orderid"/>
		    	<input type="hidden" value="tenpay" name="payment_name"/>
		    	<input type="hidden" value="${requestScope.payMoney }" name="payMoney"/>
		    	<input type="hidden" value="online" name="payment_type"/>
				<input type="button" value="下一步" style="padding: 5px 8px;" onclick="toPay()"/>
		    </div>
	   
	   </form>
    </div>
</div>

	<%@ include file="/commons/foot.jsp" %>

	<div id="_link_div_win" style="display:none;z-index:1001;background:#EFF2F5;position: absolute;-moz-border-radius: 3px;-webkit-border-radius: 3px;">
		<div style="height: 33px;line-height: 33px;background:#3177BF;-moz-border-radius: 3px;-webkit-border-radius: 3px;width: 390px;margin: 0 auto;margin-top: 5px;">
			<span style="padding-left: 20px;color: #ffffff;font-size: 14px;">网上支付提示</span>
		</div>
		<div style="font-size: 12px;padding: 0px 0px 0px 20px;height: 85px;line-height: 25px;">
			支付完成前，前不要关闭此支付验证窗口。<br/>
			支付完成后，请根据您支付的情况点击下面的按钮。
		</div>
		<div style="height: 35px;text-align: center;border-top: 1px solid #ccc;padding-top: 5px;">
			<span><input type="button" value="支付完成" onclick="finishzf()"/></span>
			<span style="padding-left: 15px;"><input type="button" value="支付出现问题" onclick="no_finishzf()"/></span>
		</div>
	</div>

</body>

</html>